package com.csdj.controller;

import com.csdj.common.MessageCode;
import com.csdj.common.WebResult;
import com.csdj.service.RedisService;
import org.springframework.web.bind.annotation.GetMapping;

import javax.annotation.Resource;

public class TestController {
    @Resource
    private RedisService redisService;


    @GetMapping("/msg")
    public WebResult publish(String msg){
        redisService.publish("test",msg);
        //return new WebResult(MessageCode.SUCCESS);
        return new WebResult(1);
    }
}
